package com.kpmg.datalake.accountcheck.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.kpmg.datalake.accountcheck.dao.KpmgChkactPrtMapper;
import com.kpmg.datalake.accountcheck.model.KpmgChkactPrt;
import com.kpmg.datalake.accountcheck.service.IKpmgChkactPrtService;
import com.kpmg.datalake.common.dynamicdatasource.DynamicDS;
import org.springframework.util.CollectionUtils;

/**
 * <p>
 * 对账结果表（本方、对方记录） 服务实现类
 * </p>
 *
 * @author timqian
 * @since 2018-08-03
 */
@Service
public class KpmgChkactPrtServiceImpl extends ServiceImpl<KpmgChkactPrtMapper, KpmgChkactPrt>implements IKpmgChkactPrtService {
	
	@DynamicDS("projectId")
	@Override
	public boolean insertChkactPrtDataByBatch(String projectId, List<KpmgChkactPrt> entityList, int batchSize) {
		if (!CollectionUtils.isEmpty(entityList)) {
			return super.insertBatch(entityList, batchSize);
		}
		return true;
	}
}
